// 组件通讯

import { createRouter, createWebHistory } from "vue-router";

import Index from "../pages/cc/index.vue";
import Props from "../pages/cc/01_props/Parent.vue";
import Event from "../pages/cc/02_event/Parent.vue";
import Mitt from "../pages/cc/03_mitt/Parent.vue";
import VModel from "../pages/cc/04_v-model/Parent.vue";
import Attrs from "../pages/cc/05_$attrs/Parent.vue";
import RefsParent from "../pages/cc/06_$refs_$parent/Parent.vue";
import ProvideInject from "../pages/cc/07_provide_inject/Parent.vue";
import Pinia from "../pages/cc/08_pinia/Parent.vue";
import Slot from "../pages/cc/09_slot/Parent.vue";

export const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      component: Index,
    },
    {
      path: "/props",
      component: Props,
    },
    {
      path: "/event",
      component: Event,
    },
    {
      path: "/mitt",
      component: Mitt,
    },
    {
      path: "/v-model",
      component: VModel,
    },
    {
      path: "/attrs",
      component: Attrs,
    },
    {
      path: "/refs-parent",
      component: RefsParent,
    },
    {
      path: "/provide-inject",
      component: ProvideInject,
    },
    {
      path: "/pinia",
      component: Pinia,
    },
    {
      path: "/slot",
      component: Slot,
    },
  ],
});
